<?php

namespace IDock\Insurance\MACN\Response;

use IDock\Http\Response;
use IDock\Insurance\MACN\Response\AllMACNResponse;
use IDock\Printer\NonCar\NonCarProductListPrinter;
use IDock\Printer\NonCar\NonCarProductPrinter;
use IDock\Printer\NonCar\NonCarSubCoveragePrinter;
use IDock\Printer\UnderwritingRecallPrinter;

class NonCarProductListResponse extends AllMACNResponse
{
    public function resolve(): Response
    {
        $body = $this->getBody();
        if ($body) {
            libxml_disable_entity_loader();
            $body = simplexml_load_string($body);
            $body = $this->objectToArray($body);
            $errorCode = $body['head']['statusCode'] ?? '';
            if ($errorCode !== 'success' && $errorCode !== '000000') {
                $this->setError($body['head']['description'] ?? '未知错误或无错误提示');
                return $this;
            }
            $this->setBody($body['body'] ?? '');
        }

        return $this;
    }

    public function printerInit(): Response
    {
        $printer = new NonCarProductListPrinter();

//        $list = $this->getBody();
        $list = [
            [
                'productCode' => '01184000064',
                'productName' => '驾乘守护（单交版）',
                'planCode' => '01184000064',
                'planName' => '驾乘守护（单交版）',
                'maxQuantity' => '1',
                'amount' => '50.0',
                'coverageList' => [
                    [
                        'subCode' => '1181001',
                        'subName' => '司乘人员意外伤害保险',
                        'amount' => '50000.00',
                        'premium' => '50.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '11TY004',
                        'subName' => '附加意外伤害医疗保险',
                        'amount' => '5000.00',
                        'premium' => '0',
                        'rate' => '0E-7',
                    ]
                ],
            ],
            [
                'productCode' => '01184000093',
                'productName' => '司乘守护（短期版）',
                'planCode' => '01184000093',
                'planName' => '司乘守护（短期版）',
                'maxQuantity' => '1',
                'amount' => '10',
                'coverageList' => [
                    [
                        'subCode' => '1181001',
                        'subName' => '司乘人员意外伤害保险',
                        'amount' => '10000.00',
                        'premium' => '10.00',
                        'rate' => '1.0',
                    ]
                ],
            ],
            [
                'productCode' => '01184000076',
                'productName' => '驾乘守护（基础版）',
                'planCode' => '01184000076',
                'planName' => '驾乘守护（基础版）',
                'maxQuantity' => '1',
                'amount' => '50.0',
                'coverageList' => [
                    [
                        'subCode' => '1181001',
                        'subName' => '司乘人员意外伤害保险',
                        'amount' => '50000.00',
                        'premium' => '50.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '1181002',
                        'subName' => '附加司乘人员意外伤害医疗保险',
                        'amount' => '5000.00',
                        'premium' => '0',
                        'rate' => '0E-7',
                    ]
                ],
            ],
            [
                'productCode' => '01184000057',
                'productName' => '驾乘守护（领先版）',
                'planCode' => '01184000057',
                'planName' => '驾乘守护（领先版）',
                'maxQuantity' => '5',
                'amount' => '160.0',
                'coverageList' => [
                    [
                        'subCode' => '1181001',
                        'subName' => '司乘人员意外伤害保险',
                        'amount' => '150000.00',
                        'premium' => '160.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '11TY004',
                        'subName' => '附加意外伤害医疗保险',
                        'amount' => '20000.00',
                        'premium' => '0',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '11TY003',
                        'subName' => '任我行交通意外伤害保险',
                        'amount' => '1000000.00',
                        'premium' => '0',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '11TY003',
                        'subName' => '任我行交通意外伤害保险',
                        'amount' => '1000000.00',
                        'premium' => '0',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '11TY003',
                        'subName' => '任我行交通意外伤害保险',
                        'amount' => '600000.00',
                        'premium' => '0',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '11TY003',
                        'subName' => '任我行交通意外伤害保险',
                        'amount' => '500000.00',
                        'premium' => '0',
                        'rate' => '0E-7',
                    ]
                ],
            ],
            [
                'productCode' => '01184000055',
                'productName' => '驾乘守护（豪华版）',
                'planCode' => '01184000055',
                'planName' => '驾乘守护（豪华版）',
                'maxQuantity' => '1',
                'amount' => '220.0',
                'coverageList' => [
                    [
                        'subCode' => '1181001',
                        'subName' => '司乘人员意外伤害保险',
                        'amount' => '200000.00',
                        'premium' => '220.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '11TY004',
                        'subName' => '附加意外伤害医疗保险',
                        'amount' => '30000.00',
                        'premium' => '0',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '11TY003',
                        'subName' => '任我行交通意外伤害保险',
                        'amount' => '1500000.00',
                        'premium' => '0',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '11TY003',
                        'subName' => '任我行交通意外伤害保险',
                        'amount' => '1200000.00',
                        'premium' => '0',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '11TY003',
                        'subName' => '任我行交通意外伤害保险',
                        'amount' => '1000000.00',
                        'premium' => '0',
                        'rate' => '0E-7',
                    ],
                ],
            ],
            [
                'productCode' => '01184000054',
                'productName' => '驾乘守护（舒享版）',
                'planCode' => '01184000054',
                'planName' => '驾乘守护（舒享版）',
                'maxQuantity' => '5',
                'amount' => '120.0',
                'coverageList' => [
                    [
                        'subCode' => '1181001',
                        'subName' => '司乘人员意外伤害保险',
                        'amount' => '100000.00',
                        'premium' => '120.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '11TY004',
                        'subName' => '附加意外伤害医疗保险',
                        'amount' => '20000.00',
                        'premium' => '0',
                        'rate' => '0E-7',
                    ],
                ],
            ],
            [
                'productCode' => '01184000067',
                'productName' => '驾乘守护（企业尊贵版）',
                'planCode' => '01184000067',
                'planName' => '驾乘守护（企业尊贵版）',
                'maxQuantity' => '2',
                'amount' => '300.0',
                'coverageList' => [
                    [
                        'subCode' => '1181001',
                        'subName' => '司乘人员意外伤害保险',
                        'amount' => '300000.00',
                        'premium' => '300.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '11TY004',
                        'subName' => '附加意外伤害医疗保险',
                        'amount' => '30000.00',
                        'premium' => '0',
                        'rate' => '0E-7',
                    ],
                ],
            ],
            [
                'productCode' => '01184000066',
                'productName' => '驾乘守护（企业豪华版）',
                'planCode' => '01184000066',
                'planName' => '驾乘守护（企业豪华版）',
                'maxQuantity' => '5',
                'amount' => '200.0',
                'coverageList' => [
                    [
                        'subCode' => '1181001',
                        'subName' => '司乘人员意外伤害保险',
                        'amount' => '200000.00',
                        'premium' => '200.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '11TY004',
                        'subName' => '附加意外伤害医疗保险',
                        'amount' => '20000.00',
                        'premium' => '0',
                        'rate' => '0E-7',
                    ],
                ],
            ],
            [
                'productCode' => '01184000058',
                'productName' => '2吨以下货安行（高配版）',
                'planCode' => '01184000058',
                'planName' => '2吨以下货安行（高配版）',
                'maxQuantity' => '3',
                'amount' => '420.0',
                'coverageList' => [
                    [
                        'subCode' => '1181001',
                        'subName' => '司乘人员意外伤害保险',
                        'amount' => '100000.00',
                        'premium' => '420.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '1181002',
                        'subName' => '附加司乘人员意外伤害医疗保险',
                        'amount' => '10000.00',
                        'premium' => '0',
                        'rate' => '0E-7',
                    ],
                ],
            ],
            [
                'productCode' => '01184000059',
                'productName' => '2吨以下货安行（标配版）',
                'planCode' => '01184000059',
                'planName' => '2吨以下货安行（标配版）',
                'maxQuantity' => '3',
                'amount' => '220.0',
                'coverageList' => [
                    [
                        'subCode' => '1181001',
                        'subName' => '司乘人员意外伤害保险',
                        'amount' => '50000.00',
                        'premium' => '220.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '1181002',
                        'subName' => '附加司乘人员意外伤害医疗保险',
                        'amount' => '5000.00',
                        'premium' => '0',
                        'rate' => '0E-7',
                    ],
                ],
            ],
            [
                'productCode' => '01184000085',
                'productName' => '2吨以下货安行（基础版）',
                'planCode' => '01184000085',
                'planName' => '2吨以下货安行（基础版）',
                'maxQuantity' => '3',
                'amount' => '158.0',
                'coverageList' => [
                    [
                        'subCode' => '1181001',
                        'subName' => '司乘人员意外伤害保险',
                        'amount' => '30000.00',
                        'premium' => '100.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '11TY004',
                        'subName' => '附加意外伤害医疗保险',
                        'amount' => '3000.00',
                        'premium' => '58.0',
                        'rate' => '0E-7',
                    ],
                ],
            ],
            [
                'productCode' => '01184000060',
                'productName' => '2-10吨货安行（标配版）',
                'planCode' => '01184000060',
                'planName' => '2-10吨货安行（标配版）',
                'maxQuantity' => '3',
                'amount' => '280.0',
                'coverageList' => [
                    [
                        'subCode' => '1181001',
                        'subName' => '司乘人员意外伤害保险',
                        'amount' => '100000.00',
                        'premium' => '280.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '1181002',
                        'subName' => '附加司乘人员意外伤害医疗保险',
                        'amount' => '10000.00',
                        'premium' => '0',
                        'rate' => '0E-7',
                    ],
                ],
            ],
            [
                'productCode' => '01184000061',
                'productName' => '2-10吨货安行（高配版）',
                'planCode' => '01184000061',
                'planName' => '2-10吨货安行（高配版）',
                'maxQuantity' => '2',
                'amount' => '680.0',
                'coverageList' => [
                    [
                        'subCode' => '1181001',
                        'subName' => '司乘人员意外伤害保险',
                        'amount' => '250000.00',
                        'premium' => '680.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '1181002',
                        'subName' => '附加司乘人员意外伤害医疗保险',
                        'amount' => '25000.00',
                        'premium' => '0',
                        'rate' => '0E-7',
                    ],
                ],
            ],
            [
                'productCode' => '01184000062',
                'productName' => '货安行-大货及特种车（标配版）',
                'planCode' => '01184000062',
                'planName' => '货安行-大货及特种车（标配版）',
                'maxQuantity' => '2',
                'amount' => '500.0',
                'coverageList' => [
                    [
                        'subCode' => '1181001',
                        'subName' => '司乘人员意外伤害保险',
                        'amount' => '100000.00',
                        'premium' => '500.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '1181002',
                        'subName' => '附加司乘人员意外伤害医疗保险',
                        'amount' => '10000.00',
                        'premium' => '0',
                        'rate' => '0E-7',
                    ],
                ],
            ],
            [
                'productCode' => '01184000063',
                'productName' => '货安行-大货及特种车（高配版）',
                'planCode' => '01184000063',
                'planName' => '货安行-大货及特种车（高配版）',
                'maxQuantity' => '2',
                'amount' => '800.0',
                'coverageList' => [
                    [
                        'subCode' => '1181001',
                        'subName' => '司乘人员意外伤害保险',
                        'amount' => '200000.00',
                        'premium' => '800.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '1181002',
                        'subName' => '附加意外伤害医疗保险',
                        'amount' => '15000.00',
                        'premium' => '0',
                        'rate' => '0E-7',
                    ],
                ],
            ],
            [
                'productCode' => '01184000068',
                'productName' => '货安行-货车及特种车（单交版）',
                'planCode' => '01184000068',
                'planName' => '货安行-货车及特种车（单交版）',
                'maxQuantity' => '2',
                'amount' => '180.0',
                'coverageList' => [
                    [
                        'subCode' => '1181001',
                        'subName' => '司乘人员意外伤害保险',
                        'amount' => '50000.00',
                        'premium' => '100.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '1181002',
                        'subName' => '附加司乘人员意外伤害医疗保险',
                        'amount' => '5000.00',
                        'premium' => '80',
                        'rate' => '0E-7',
                    ],
                ],
            ],
            [
                'productCode' => '01184000077',
                'productName' => '货安行-货车及特种车（基础版）',
                'planCode' => '01184000077',
                'planName' => '货安行-货车及特种车（基础版）',
                'maxQuantity' => '1',
                'amount' => '249.0',
                'coverageList' => [
                    [
                        'subCode' => '1181001',
                        'subName' => '司乘人员意外伤害保险',
                        'amount' => '50000.00',
                        'premium' => '200.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '1181002',
                        'subName' => '附加司乘人员意外伤害医疗保险',
                        'amount' => '5000.00',
                        'premium' => '49.00',
                        'rate' => '0E-7',
                    ],
                ],
            ],
            [
                'productCode' => '01184000065',
                'productName' => '营业客（豪华版）',
                'planCode' => '01184000065',
                'planName' => '营业客（豪华版）',
                'maxQuantity' => '2',
                'amount' => '288.0',
                'coverageList' => [
                    [
                        'subCode' => '1181001',
                        'subName' => '司乘人员意外伤害保险',
                        'amount' => '100000.00',
                        'premium' => '288.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '1181002',
                        'subName' => '附加司乘人员意外伤害医疗保险',
                        'amount' => '10000.00',
                        'premium' => '0',
                        'rate' => '0E-7',
                    ],
                ],
            ],
            [
                'productCode' => '10000000057',
                'productName' => '安家保（豪华版）',
                'planCode' => '10000000057',
                'planName' => '安家保（豪华版）',
                'maxQuantity' => '1',
                'amount' => '99.0',
                'coverageList' => [
                    [
                        'subCode' => '0192001',
                        'subName' => '家庭财产保险-房屋及附属设备',
                        'amount' => '500000.00',
                        'premium' => '90.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '0192011',
                        'subName' => '家庭财产保险-室内装潢',
                        'amount' => '50000.00',
                        'premium' => '0',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '0192012',
                        'subName' => '家庭财产保险-室内财产',
                        'amount' => '50000.00',
                        'premium' => '0',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '1155001',
                        'subName' => '任我行交通意外伤害保险',
                        'amount' => '300000.00',
                        'premium' => '9',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '1155001',
                        'subName' => '任我行交通意外伤害保险',
                        'amount' => '100000.00',
                        'premium' => '0',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '1155001',
                        'subName' => '任我行交通意外伤害保险',
                        'amount' => '100000.00',
                        'premium' => '0',
                        'rate' => '0E-7',
                    ],
                ],
            ],
            [
                'productCode' => '10000000058',
                'productName' => '安家保（尊贵版）',
                'planCode' => '10000000058',
                'planName' => '安家保（尊贵版）',
                'maxQuantity' => '1',
                'amount' => '299.0',
                'coverageList' => [
                    [
                        'subCode' => '0192001',
                        'subName' => '家庭财产保险-房屋及附属设备',
                        'amount' => '1000000.00',
                        'premium' => '284.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '0192011',
                        'subName' => '家庭财产保险-室内装潢',
                        'amount' => '100000.00',
                        'premium' => '0',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '0192012',
                        'subName' => '家庭财产保险-室内财产',
                        'amount' => '100000.00',
                        'premium' => '0',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '0192002',
                        'subName' => '附加家庭财产盗抢保险',
                        'amount' => '40000.00',
                        'premium' => '0',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '0192007',
                        'subName' => '附加家用电器用电安全险',
                        'amount' => '20000.00',
                        'premium' => '0',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '0192008',
                        'subName' => '家庭财产保险-民用管道燃气',
                        'amount' => '20000.00',
                        'premium' => '0',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '0192009',
                        'subName' => '附加水暖管爆裂损失保险',
                        'amount' => '20000.00',
                        'premium' => '0',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '0192010',
                        'subName' => '附加个人居家第三者责任保险',
                        'amount' => '10000.00',
                        'premium' => '0',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '1155001',
                        'subName' => '任我行交通意外伤害保险',
                        'amount' => '500000.00',
                        'premium' => '15.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '1155001',
                        'subName' => '任我行交通意外伤害保险',
                        'amount' => '200000.00',
                        'premium' => '0.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '1155001',
                        'subName' => '任我行交通意外伤害保险',
                        'amount' => '200000.00',
                        'premium' => '0.00',
                        'rate' => '0E-7',
                    ],
                ],
            ],
            [
                'productCode' => '10000000073',
                'productName' => '家乘无忧（单交版）',
                'planCode' => '10000000073',
                'planName' => '家乘无忧（单交版）',
                'maxQuantity' => '1',
                'amount' => '58.0',
                'coverageList' => [
                    [
                        'subCode' => '1181001',
                        'subName' => '司乘人员意外伤害保险',
                        'amount' => '50000.00',
                        'premium' => '18.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '1181002',
                        'subName' => '附加司乘人员意外伤害医疗保险',
                        'amount' => '5000.00',
                        'premium' => '10.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '01B9002',
                        'subName' => '家庭财产保险（2023版）-房屋及附属设施',
                        'amount' => '100000.00',
                        'premium' => '10.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '01B9003',
                        'subName' => '家庭财产保险（2023版）-室内装潢',
                        'amount' => '10000.00',
                        'premium' => '10.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '01B9004',
                        'subName' => '家庭财产保险（2023版）-室内财产',
                        'amount' => '10000.00',
                        'premium' => '10.00',
                        'rate' => '0E-7',
                    ],
                ],
            ],
            [
                'productCode' => '10000000074',
                'productName' => '家乘无忧（经济版）',
                'planCode' => '10000000074',
                'planName' => '家乘无忧（经济版）',
                'maxQuantity' => '1',
                'amount' => '188.0',
                'coverageList' => [
                    [
                        'subCode' => '1181001',
                        'subName' => '司乘人员意外伤害保险',
                        'amount' => '150000.00',
                        'premium' => '50.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '1181002',
                        'subName' => '附加司乘人员意外伤害医疗保险',
                        'amount' => '20000.00',
                        'premium' => '50.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '11TY008',
                        'subName' => '附加意外伤害住院津贴保险',
                        'amount' => '9000.00',
                        'premium' => '28.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '01B9002',
                        'subName' => '家庭财产保险（2023版）-房屋及附属设施',
                        'amount' => '200000.00',
                        'premium' => '20.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '01B9003',
                        'subName' => '家庭财产保险（2023版）-室内装潢',
                        'amount' => '20000.00',
                        'premium' => '20.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '01B9004',
                        'subName' => '家庭财产保险（2023版）-室内财产',
                        'amount' => '20000.00',
                        'premium' => '10.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '01HY012',
                        'subName' => '附加家用电器用电安全保险',
                        'amount' => '10000.00',
                        'premium' => '10.00',
                        'rate' => '0E-7',
                    ],
                ],
            ],
            [
                'productCode' => '10000000075',
                'productName' => '家乘无忧（进阶版）',
                'planCode' => '10000000075',
                'planName' => '家乘无忧（进阶版）',
                'maxQuantity' => '1',
                'amount' => '258.0',
                'coverageList' => [
                    [
                        'subCode' => '1181001',
                        'subName' => '司乘人员意外伤害保险',
                        'amount' => '250000.00',
                        'premium' => '100.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '1181002',
                        'subName' => '附加司乘人员意外伤害医疗保险',
                        'amount' => '30000.00',
                        'premium' => '20.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '11TY008',
                        'subName' => '附加意外伤害住院津贴保险',
                        'amount' => '9000.00',
                        'premium' => '20.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '11TY020',
                        'subName' => '附加意外伤害救护车费用保险',
                        'amount' => '1000.00',
                        'premium' => '6.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '01B9002',
                        'subName' => '家庭财产保险（2023版）-房屋及附属设施',
                        'amount' => '500000.00',
                        'premium' => '50.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '01B9003',
                        'subName' => '家庭财产保险（2023版）-室内装潢',
                        'amount' => '100000.00',
                        'premium' => '25.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '01B9004',
                        'subName' => '家庭财产保险（2023版）-室内财产',
                        'amount' => '100000.00',
                        'premium' => '25.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '01HY012',
                        'subName' => '附加家用电器用电安全保险',
                        'amount' => '20000.00',
                        'premium' => '12.00',
                        'rate' => '0E-7',
                    ],
                ],
            ],
            [
                'productCode' => '10000000076',
                'productName' => '家乘无忧（豪华版）',
                'planCode' => '10000000076',
                'planName' => '家乘无忧（豪华版）',
                'maxQuantity' => '1',
                'amount' => '368.0',
                'coverageList' => [
                    [
                        'subCode' => '1181001',
                        'subName' => '司乘人员意外伤害保险',
                        'amount' => '500000.00',
                        'premium' => '100.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '1181002',
                        'subName' => '附加司乘人员意外伤害医疗保险',
                        'amount' => '50000.00',
                        'premium' => '50.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '11TY008',
                        'subName' => '附加意外伤害住院津贴保险',
                        'amount' => '9000.00',
                        'premium' => '26.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '11TY020',
                        'subName' => '附加意外伤害救护车费用保险',
                        'amount' => '2000.00',
                        'premium' => '20.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '01B9003',
                        'subName' => '家庭财产保险（2023版）-室内装潢',
                        'amount' => '100000.00',
                        'premium' => '20.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '01B9004',
                        'subName' => '家庭财产保险（2023版）-室内财产',
                        'amount' => '100000.00',
                        'premium' => '20.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '01B9002',
                        'subName' => '家庭财产保险（2023版）-房屋及附属设施',
                        'amount' => '1000000.00',
                        'premium' => '100.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '01HY012',
                        'subName' => '附加家用电器用电安全保险',
                        'amount' => '20000.00',
                        'premium' => '20.00',
                        'rate' => '0E-7',
                    ], [
                        'subCode' => '01HY008',
                        'subName' => '附加管道破裂及水渍保险',
                        'amount' => '20000.00',
                        'premium' => '12.00',
                        'rate' => '0E-7',
                    ],
                ],
            ],
            [
                'productCode' => '10000000077',
                'productName' => '家乘无忧（至臻版）',
                'planCode' => '10000000077',
                'planName' => '家乘无忧（至臻版）',
                'maxQuantity' => '1',
                'amount' => '688.0',
                'coverageList' => [
                    [
                        'subCode' => '1181001',
                        'subName' => '司乘人员意外伤害保险',
                        'amount' => '1000000.00',
                        'premium' => '100.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '1181002',
                        'subName' => '附加司乘人员意外伤害医疗保险',
                        'amount' => '100000.00',
                        'premium' => '100.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '11TY008',
                        'subName' => '附加意外伤害住院津贴保险',
                        'amount' => '18000.00',
                        'premium' => '100.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '11TY020',
                        'subName' => '附加意外伤害救护车费用保险',
                        'amount' => '5000.00',
                        'premium' => '74.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '01B9003',
                        'subName' => '家庭财产保险（2023版）-室内装潢',
                        'amount' => '500000.00',
                        'premium' => '100.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '01B9004',
                        'subName' => '家庭财产保险（2023版）-室内财产',
                        'amount' => '300000.00',
                        'premium' => '50.00',
                        'rate' => '0E-7',
                    ],
                    [
                        'subCode' => '01B9002',
                        'subName' => '家庭财产保险（2023版）-房屋及附属设施',
                        'amount' => '2000000.00',
                        'premium' => '100.00',
                        'rate' => '0E-7',
                    ], [
                        'subCode' => '01HY012',
                        'subName' => '附加家用电器用电安全保险',
                        'amount' => '50000.00',
                        'premium' => '50.00',
                        'rate' => '0E-7',
                    ], [
                        'subCode' => '01HY008',
                        'subName' => '附加管道破裂及水渍保险',
                        'amount' => '2000.00',
                        'premium' => '14.00',
                        'rate' => '0E-7',
                    ],
                ],
            ],
        ];
        foreach ($list as $item) {
            $amount = $premium = '0';
            $productPrinter = new NonCarProductPrinter();
            $productPrinter->productCode = $item['productCode'] ?? '';//产品编码
            $productPrinter->productName = $item['productName'] ?? '';//产品名称
            $productPrinter->productType = '驾意险';
            $productPrinter->productDesc = '';
            $productPrinter->planCode = $item['planCode'] ?? '';//方案代码
            $productPrinter->planName = $item['planName'] ?? '';//方案名称
            $productPrinter->maxQuantity = $item['maxQuantity'] ?? '';//最大购买份数

            foreach ($item['coverageList'] ?? [] as $sub) {
                $subCoverage = new NonCarSubCoveragePrinter();
                $subCoverage->subCode = $sub['subCode'] ?? '';
                $subCoverage->subName = $sub['subName'] ?? '';
                $subCoverage->amount = $sub['amount'] ?? '0';
                $subCoverage->premium = $sub['premium'] ?? '';
                $subCoverage->rate = $sub['rate'] ?? '';

                $premium += $subCoverage->premium;
                $amount += $subCoverage->amount;
                $productPrinter->unitAmount = $amount;
                $productPrinter->subCoverageAppend($subCoverage);
            }
            $productPrinter->premium = (string)$premium;

            $printer->productListAppend($productPrinter);
        }
        $this->printer = $printer;
        return $this;
    }
}
